/**
 * 
 */
$(function(){
                setInterval(reload,2000);
                function reload(){
                	//给后台商家m的id
                	//向后台请求商家m的状态
                	//console.log("hello");
                	var icnum = $("#icnum").val();
                	//alert(icnum);
                	console.log(icnum);
                	$.ajax({
                		type:"GET",
                		url:"http://localhost:8089/merchantv2/state?icnum="+icnum
                	}).done(function(msg){
                		console.log(msg);
                		if(msg=="2"){
                			window.location.href="http://localhost:8089/merchantv2/foodlist";
                		}
                	});
                }
            });

